import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: () => import('../views/MainView.vue'),
    children: [
      {
        path: 'home',
        alias: '',
        name: 'Home',
        component: () => import('../views/Home.vue'),

        children: [
          {
            path: 'tuijian',
            alias: '',

            name: 'tuijian',
            component: () => import('../views/TuijianDateil.vue')
          },
          {
            path: 'youshengshu',

            name: 'youshengshu',
            component: () => import('../views/YouShengShu.vue')
          },
          {
            path: 'xiangsheng',

            name: 'xiangsheng',
            component: () => import('../views/XiangSheng.vue')
          },
          {
            path: 'yinyue',

            name: 'yinyue',
            component: () => import('../views/Yinyue.vue')
          },

        ]
      },
      {
        path: 'search',

        name: 'Search',
        component: () => import('../views/Search.vue')
      },
      {
        path: 'dynamic',

        name: 'Dynamic',
        component: () => import('../views/Dynamic.vue'),
      },
      {
        path: 'my',

        name: 'My',
        component: () => import('../views/My.vue')
      },

    ]

  },
  
  {
    path: '/list',

    name: 'List',
    component: () => import('../views/List.vue')
  },
  {
    path: '/detail/:id',

    name: 'Detail',
    component: () => import('../views/Detail.vue')
  },
  {
    path: '/play',

    name: 'Play',
    component: () => import('../views/Play.vue')
  },
  {
    path: '/changeinp/:value',
    name: 'changeinp',
    component: () => import('../views/ChangeInp.vue'),
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue'),
  },





]

const router = new VueRouter({
  routes
})

export default router
